Touch control method and apparatus

ABSTRACT

This application provides a touch control method and an apparatus, and relates to the field of communications technologies. The method includes: (S601) obtaining, by a terminal, a first touch operation entered by a user on a touchscreen; (S602, S603, and S604) and mapping, by the terminal when the first touch operation is performed on a first preset area in a target interface, the first touch operation to a second touch operation, so that a target application responds to the second touch operation, where the target interface is any interface that is presented by the target application and that covers the first preset area, and the target application is running in the foreground.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a national stage of International Application No.PCT/CN2017/109781, filed on Nov. 7, 2017, which is hereby incorporatedby reference in its entirety.

TECHNICAL FIELD

Embodiments of this application relate to the field of communicationstechnologies, and in particular, to a touch control method andapparatus.

BACKGROUND

Currently, various terminals (for example, a mobile phone and a tabletcomputer) generally use a touchscreen as an input apparatus, whichgreatly improves user input and operation efficiency. Generally,parameters of the touchscreen such as a touch sensitivity and responseevents for different touch actions are set before delivery of thetouchscreen (or the terminal).

However, in different touch areas in different application scenarios,users usually would like to impose different response requirements onthe parameters of the touchscreen such as the touch sensitivity. Forexample, a refined operation is usually desired for copying textinformation on a web page, and comparatively rapid control experience isneeded for a controlling role in running a control game. Obviously, afixed parameter that is set before delivery cannot meet user touchrequirements. This reduces input and output efficiency of the terminal.

SUMMARY

Embodiments of this application provide a touch control method and anapparatus, to implement refined and personalized control on atouchscreen, and improve input and output efficiency of a terminal.

To achieve the foregoing objective, the following technical solutionsare used in the embodiments of this application.

According to a first aspect, an embodiment of this application providesa touch control method, including: obtaining, by a terminal, a firsttouch operation entered by a user on a touchscreen; and mapping, by theterminal when the first touch operation is performed on a first presetarea in a target interface (namely, an interface presented by a targetapplication that is running in the foreground), the first touchoperation to a second touch operation, so that a target applicationresponds to the second touch operation, to implement an applicationfunction related to the second touch operation. In other words, the userinputs the first touch operation to the touchscreen, but based on amapping relationship that is preset by the user, the target applicationthat is running on the terminal finally responds to the user with thesecond touch operation. This implements refined and customized touchcontrol on the touchscreen, and improves input and output efficiency ofthe terminal.

In a possible design method, the mapping, by the terminal when the firsttouch operation is performed on a first preset area in a targetinterface, the first touch operation to a second touch operationincludes: searching, by the terminal when the terminal detects the firsttouch operation in the target interface, for at least one preset areaassociated with the target application (including the first presetarea); obtaining, by the terminal when a touch point of the first touchoperation falls within the first preset area, a touch mapping rule thatis preset for the first preset area; and mapping, by the terminal, thefirst touch operation to the second touch operation according to thetouch mapping rule.

Optionally, the mapping, by the terminal, the first touch operation to asecond touch operation includes: modifying, by the terminal, coordinatevalues of the touch point in the first touch operation, and usingmodified coordinate values as coordinate values of a touch point in thesecond touch operation. Subsequently, the target application may providea corresponding visual output for the user based on the modifiedcoordinate values of the touch point.

In a possible design method, the touch mapping rule includes acoordinate mapping parameter, and the mapping, by the terminal, thefirst touch operation to the second touch operation according to thetouch mapping rule includes: increasing or decreasing, by the terminal,the coordinate values of the touch point in the first touch operationbased on the coordinate mapping parameter, to obtain the coordinatevalues of the touch point in the second touch operation. In this way,the user can implement a relatively large operation effect in the presetarea by performing a relatively small operation. Alternatively, the usercan implement a relatively small operation effect in the preset area byperforming a relatively large operation. This implements a customizedeffect of a touch sensitivity in the preset area.

For example, the increasing or decreasing, by the terminal, thecoordinate values of the touch point in the first touch operation basedon the coordinate mapping parameter includes: multiplying, by theterminal, the coordinate values of the touch point in the first touchoperation by the coordinate mapping parameter, where the coordinatemapping parameter is greater than 1 or less than 1.

In a possible design method, after the modifying, by the terminal,coordinate values of the touch point in the first touch operation, themethod further includes: if the touch point with the modified coordinatevalues falls beyond a preset control boundary of the first touchoperation, using, by the terminal, coordinate values that are on thecontrol boundary and that are most approximate to the modifiedcoordinate values as the coordinate values of the touch point in thesecond touch operation. In this way, a problem that an applicationcannot correctly respond to the first touch operation because themodified coordinate exceeds an operation control area corresponding tothe first touch operation is avoided.

In a possible design method, the mapping, by the terminal, the firsttouch operation to the second touch operation according to the touchmapping rule includes: mapping, by the terminal according to the touchmapping rule, a first touch event generated when the user performs thefirst touch operation to a second touch event generated when the userperforms the second touch operation, and reporting the second touchevent to the target application. In other words, before the first touchevent generated by the first touch operation is reported to the targetapplication, the second touch event generated when the user performs thesecond touch operation may be modified according to the touch mappingrule and reported to the target application. In this case, the targetapplication may present, based on the second touch event, a responseeffect corresponding to the second touch operation, so as to implement apersonalized function of touch operation customization in the presetarea.

In a possible design method, the mapping, by the terminal, the firsttouch operation to a second touch operation, so that the targetapplication responds to the second touch operation specificallyincludes: reporting, by the terminal to the target application, a touchevent generated when the user performs the first touch operation, sothat the target application instructs the terminal to determine thefirst touch operation based on the touch event; and mapping, by theterminal, the determined first touch operation to the second touchoperation according to the touch mapping rule, and instructing thetarget application to respond to the second touch operation. In otherwords, the terminal may report, to the target application based on anormal procedure, the first touch event generated by the first touchoperation. After determining, based on the first touch event, a specificoperation (namely, the first touch operation) performed by the user, thetarget application may invoke, according to the touch mapping rule, afunction corresponding to the second touch operation to implement anapplication function corresponding to the second touch operation.

For example, the touch mapping rule may be used to instruct to map a tapoperation to a double-tap operation, or used to instruct to map a touchand hold operation to a continuous tap operation.

According to a second aspect, an embodiment of this application providesa touch control method, including: in response to a first input of auser, displaying, by a terminal, a setting interface used to indicate atouch area customized by a user; and in response to a second input ofthe user, obtaining, by the terminal, a target touch area customized bythe user on the setting interface, and a touch mapping rule customizedby the user for the target touch area, where the touch mapping rule isused to instruct to map a first touch operation obtained in the targettouch area to a second touch operation. In this way, when subsequentlyreceiving a specific touch operation entered by the user, the terminalmay find a corresponding target touch mapping rule to respond to thetouch operation, and obtain a customized touch feeling in the touch areacustomized by the user.

In a possible design method, the obtaining, by the terminal, a targettouch area customized by the user on the setting interface includes:receiving, by the terminal, a target touch area drawn by the user on thesetting interface by using a preset area template; or receiving, by theterminal, K boundary points marked by the user on the setting interface,where the K boundary points are connected in a specified sequence toconstitute the target touch area, and K>2.

In a possible design method, the obtaining, by the terminal, a touchmapping rule customized by the user for the target touch area on thesetting interface includes: receiving, by the terminal, a coordinatemapping parameter that is set by the user for the target touch area,where the coordinate mapping parameter is used to indicate a rule ofmapping coordinate values of a touch point when the terminal responds tothe first touch operation; and/or receiving, by the terminal, an eventmapping parameter that is set by the user for the target touch area,where the event mapping parameter is used to indicate a rule of mappinga touch event when the terminal responds to the first touch operation.

In other words, the user may divide a touchscreen of the terminal intological areas, to obtain the touch area customized by the user. Inaddition, the user may set, in the touch area customized by the user, atouch mapping rule that conforms to a current application scenario andan operation habit of the user, so that the user subsequently obtains acustomized touch feeling in the touch area customized by the user. Thisimplements refined and personalized control on the touchscreen of theterminal, so as to improve input and output efficiency of the terminalin different application scenarios.

In a possible design method, after the receiving, by the terminal, acoordinate mapping parameter that is set by the user for the targettouch area, the method further includes: prompting, by the terminal, theuser with a touch effect obtained at a current coordinate mappingparameter when the terminal responds to a touch operation in the targettouch area, so that the user can quickly recognize the currently setcoordinate mapping parameter.

In a possible design method, after the obtaining, by the terminal, atarget touch area customized by the user on the setting interface, and atouch mapping rule customized by the user for the target touch area, themethod further includes: receiving, by the terminal, an effective objectthat is set by the user for the touch mapping rule, where the effectiveobject includes at least one application and/or at least one displayinterface. In other words, the touch control method provided in thisapplication may provide customized touch feelings for differentapplication scenarios.

In a possible design method, after the receiving, by the terminal, aneffective object that is set by the user for the touch mapping rule, themethod further includes: establishing, by the terminal, an associationrelationship among the target touch area, the touch mapping rule of thetarget touch area, and the effective object, so that when a touchoperation entered by the user is subsequently received, a correspondingassociation relationship can be found to respond to the touch operation.

In a possible design method, the displaying, by the terminal, a settinginterface used to indicate a touch area customized by a user includes:displaying, by the terminal through superimposing on a display interfaceof a target application that is running in the foreground, a translucentsetting interface used to indicate the touch area customized by theuser, so as to intuitively provide the user with a function of settingthe customized touch area for the current target application.

According to a third aspect, an embodiment of this application providesa terminal, including a processor, a memory, and an input device thatare connected by using a bus, where the input device is configured toobtain a first touch operation entered by a user on a touchscreen, andsend the first touch operation to the processor; and the processor isconfigured to determine that the first touch operation is performed on afirst preset area in a target interface, and map the first touchoperation to a second touch operation, so that a target applicationresponds to the second touch operation, where the target interface isany interface that is presented by the target application and thatcovers the first preset area, and the target application is running inthe foreground.

In a possible design method, when the input device detects the firsttouch operation in the target interface, that the processor maps thefirst touch operation to the second touch operation specificallyincludes: the processor searches for at least one preset area associatedwith the target application, where the at least one preset area includesthe first preset area; and when a touch point of the first touchoperation falls within the first preset area, the processor obtains atouch mapping rule that is preset for the first preset area, and mapsthe first touch operation to the second touch operation according to thetouch mapping rule.

In a possible design method, that the processor maps the first touchoperation to the second touch operation specifically includes: theprocessor modifies coordinate values of the touch point in the firsttouch operation, and uses modified coordinate values as coordinatevalues of a touch point in the second touch operation.

In a possible design method, the touch mapping rule includes acoordinate mapping parameter, and that the processor maps the firsttouch operation to the second touch operation according to the touchmapping rule specifically includes: the processor increases or decreasesthe coordinate values of the touch point in the first touch operationbased on the coordinate mapping parameter, to obtain the coordinatevalues of the touch point in the second touch operation.

In a possible design method, that the processor increases or decreasesthe coordinate values of the touch point in the first touch operationbased on the coordinate mapping parameter specifically includes: theprocessor multiplies the coordinate values of the touch point in thefirst touch operation by the coordinate mapping parameter, where thecoordinate mapping parameter is greater than 1 or less than 1.

In a possible design method, the processor is further configured todetermine that the touch point with the modified coordinate values fallsbeyond a preset control boundary of the first touch operation, and usecoordinate values that are on the control boundary and that are mostapproximate to the modified coordinate values as the coordinate valuesof the touch point in the second touch operation.

In a possible design method, that the processor maps the first touchoperation to the second touch operation according to the touch mappingrule specifically includes: the processor maps, according to the touchmapping rule, a first touch event generated when the user performs thefirst touch operation to a second touch event generated when the userperforms the second touch operation, and reports the second touch eventto the target application.

In a possible design method, that the processor maps the first touchoperation to the second touch operation, so that the target applicationresponds to the second touch operation specifically includes: theprocessor reports, to the target application, a touch event generatedwhen the user performs the first touch operation, so that the targetapplication instructs the terminal to determine the first touchoperation based on the touch event; and the processor maps thedetermined first touch operation to the second touch operation accordingto the touch mapping rule, and instructs the target application torespond to the second touch operation.

According to a fourth aspect, an embodiment of this application providesa terminal, including a processor, a memory, a display, and an inputdevice that are connected by using a bus, where the input device isconfigured to receive a first input and a second input of a user; thedisplay is configured to: in response to the first input, display asetting interface used to indicate a touch area customized by a user;and the processor is configured to: in response to the second input,obtain a target touch area customized by the user on the settinginterface, and a touch mapping rule customized by the user for thetarget touch area, where the touch mapping rule is used to instruct tomap a first touch operation obtained in the target touch area to asecond touch operation.

In a possible design method, the input device is further configured to:

receive a target touch area drawn by the user on the setting interfaceby using a preset area template; or receive K boundary points marked bythe user on the setting interface, where the K boundary points areconnected in a specified sequence to constitute the target touch area,and K>2.

In a possible design method, the input device is further configured to:receive a coordinate mapping parameter that is set by the user for thetarget touch area, where the coordinate mapping parameter is used toindicate a rule of mapping coordinate values of a touch point when theterminal responds to the first touch operation; and/or receive an eventmapping parameter that is set by the user for the target touch area,where the event mapping parameter is used to indicate a rule of mappinga touch event when the terminal responds to the first touch operation.

In a possible design method, the display is further configured toprompt, at a current coordinate mapping parameter, the user with a toucheffect obtained when the terminal responds to a touch operation in thetarget touch area.

In a possible design method, the input device is further configured toreceive an effective object that is set by the user for the touchmapping rule, where the effective object includes at least oneapplication and/or at least one display interface.

In a possible design method, the processor is further configured toestablish an association relationship among the target touch area, thetouch mapping rule of the target touch area, and the effective object,and store the association relationship in the memory.

In a possible design method, the display is specifically configured todisplay, through superimposing on a display interface of a targetapplication that is running in the foreground, a translucent settinginterface used to indicate the touch area customized by the user.

According to a fifth aspect, an embodiment of this application providesa terminal, including: an obtaining unit, configured to obtain a firsttouch operation entered by a user on a touchscreen; and a mapping unit,configured to: when the first touch operation is performed on a firstpreset area on a target interface, map the first touch operation to asecond touch operation, so that a target application responds to thesecond touch operation, where the target interface is any interface thatis presented by the target application and that covers the first presetarea, and the target application is running in the foreground.

In a possible design method, the mapping unit is specifically configuredto: when the terminal detects the first touch operation in the targetinterface, search for at least one preset area associated with thetarget application, where the at least one preset area includes thefirst preset area; and when a touch point of the first touch operationfalls within the first preset area, obtain a touch mapping rule that ispreset for the first preset area, and maps the first touch operation tothe second touch operation according to the touch mapping rule.

In a possible design method, the mapping unit is specifically configuredto: modify coordinate values of the touch point in the first touchoperation, and use modified coordinate values as coordinate values of atouch point in the second touch operation.

In a possible design method, the touch mapping rule includes acoordinate mapping parameter, and the mapping unit is specificallyconfigured to increase or decrease the coordinate values of the touchpoint in the first touch operation based on the coordinate mappingparameter, to obtain the coordinate values of the touch point in thesecond touch operation.

In a possible design method, the mapping unit is specifically configuredto multiply the coordinate values of the touch point in the first touchoperation by the coordinate mapping parameter, where the coordinatemapping parameter is greater than 1 or less than 1.

In a possible design method, the mapping unit is further configured to,if the touch point with the modified coordinate values falls beyond apreset control boundary of the first touch operation, use coordinatevalues that are on the control boundary and that are most approximate tothe modified coordinate values as the coordinate values of the touchpoint in the second touch operation.

In a possible design method, the mapping unit is specifically configuredto: map, according to the touch mapping rule, a first touch eventgenerated when the user performs the first touch operation to a secondtouch event generated when the user performs the second touch operation;and report the second touch event to the target application.

In a possible design method, the mapping unit is specifically configuredto: report, to the target application, a touch event generated when theuser performs the first touch operation, so that the target applicationinstructs the terminal to determine the first touch operation based onthe touch event; map the determined first touch operation to the secondtouch operation according to the touch mapping rule; and instruct thetarget application to respond to the second touch operation.

According to a fifth aspect, an embodiment of this application providesa terminal, including: an obtaining unit, configured to obtain a firstinput and a second input of a user; and a display unit, configured todisplay a setting interface used to indicate a touch area customized bya user, where the obtaining unit is further configured to obtain atarget touch area customized by the user on the setting interface, and atouch mapping rule customized by the user for the target touch area,where the touch mapping rule is used to instruct to map a first touchoperation obtained in the target touch area to a second touch operation.

In a possible design method, the obtaining unit is specificallyconfigured to: receive a target touch area drawn by the user on thesetting interface by using a preset area template; or receive K boundarypoints marked by the user on the setting interface, where the K boundarypoints are connected in a specified sequence to constitute the targettouch area, and K>2.

In a possible design method, the obtaining unit is specificallyconfigured to: receive a coordinate mapping parameter that is set by theuser for the target touch area, where the coordinate mapping parameteris used to indicate a rule of mapping coordinate values of a touch pointwhen the terminal responds to the first touch operation; and/or receivean event mapping parameter that is set by the user for the target toucharea, where the event mapping parameter is used to indicate a rule ofmapping a touch event when the terminal responds to the first touchoperation.

In a possible design method, the display unit is further configured toprompt, at a current coordinate mapping parameter, the user with a toucheffect obtained when the terminal responds to a touch operation in thetarget touch area.

In a possible design method, the obtaining unit is further configured toreceive an effective object that is set by the user for the touchmapping rule, where the effective object includes at least oneapplication and/or at least one display interface.

In a possible design method, the terminal further includes a storageunit, configured to establish an association relationship among thetarget touch area, the touch mapping rule of the target touch area, andthe effective object.

In a possible design method, the display unit is specifically configuredto display, through superimposing on a display interface of a targetapplication that is running in the foreground, a translucent settinginterface used to indicate the touch area customized by the user.

According to a seventh aspect, an embodiment of this applicationprovides a terminal, including a processor, a memory, a bus, and acommunications interface. The memory is configured to store a computerexecution instruction. The processor and the memory are connected byusing the bus. When the terminal is run, the processor executes thecomputer execution instruction stored in the memory, so that theterminal performs any one of the foregoing touch control methods.

According to an eighth aspect, an embodiment of this applicationprovides a computer-readable storage medium. The computer-readablestorage medium stores an instruction, and when the instruction is run onany one of the foregoing terminals, the terminal performs any one of theforegoing touch control methods.

According to a ninth aspect, an embodiment of this application providesa computer program product including an instruction. When theinstruction is run on any one of the foregoing terminals, the terminalperforms any one of the foregoing touch control methods.

In the embodiments of this application, names of the components in theterminal constitute no limitation on the device. In actualimplementation, the components may have other names. Any component whosefunction is similar to that in the embodiments of this application fallswithin the scope of protection defined by the claims and theirequivalent technologies of this application.

In addition, for technical effects brought by any design manner of thethird aspect to the ninth aspect, reference may be made to technicaleffects brought by different design methods of the first aspect and thesecond aspect. Details are not described herein again.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic structural diagram 1 of a terminal according to anembodiment of this application;

FIG. 2(a) and FIG. 2(b) are a schematic diagram 1 of an applicationscenario of a touch control method according to an embodiment of thisapplication;

FIG. 3 is a schematic architectural diagram 1 of an Android systemaccording to an embodiment of this application;

FIG. 4 is a schematic architectural diagram 2 of an Android systemaccording to an embodiment of this application;

FIG. 5 is a schematic flowchart 1 of a touch control method according toan embodiment of this application;

FIG. 6 is a schematic diagram 2 of an application scenario of a touchcontrol method according to an embodiment of this application;

FIG. 7A is a schematic diagram 3 of an application scenario of a touchcontrol method according to an embodiment of this application;

FIG. 7B is a schematic diagram 4 of an application scenario of a touchcontrol method according to an embodiment of this application;

FIG. 8 is a schematic diagram 5 of an application scenario of a touchcontrol method according to an embodiment of this application;

FIG. 9 is a schematic diagram 6 of an application scenario of a touchcontrol method according to an embodiment of this application;

FIG. 10 is a schematic diagram 7 of an application scenario of a touchcontrol method according to an embodiment of this application;

FIG. 11 is a schematic diagram 8 of an application scenario of a touchcontrol method according to an embodiment of this application;

FIG. 12 is a schematic diagram 9 of an application scenario of a touchcontrol method according to an embodiment of this application;

FIG. 13 is a schematic diagram 10 of an application scenario of a touchcontrol method according to an embodiment of this application;

FIG. 14 is a schematic diagram 11 of an application scenario of a touchcontrol method according to an embodiment of this application;

FIG. 15 is a schematic diagram 12 of an application scenario of a touchcontrol method according to an embodiment of this application;

FIG. 16 is a schematic interaction diagram of a touch control methodaccording to an embodiment of this application;

FIG. 17 is a schematic flowchart 2 of a touch control method accordingto an embodiment of this application;

FIG. 18 is a schematic diagram 13 of an application scenario of a touchcontrol method according to an embodiment of this application;

FIG. 19(a) and FIG. 19(b) are a schematic diagram 14 of an applicationscenario of a touch control method according to an embodiment of thisapplication;

FIG. 20 is a schematic diagram 15 of an application scenario of a touchcontrol method according to an embodiment of this application;

FIG. 21 is a schematic diagram 16 of an application scenario of a touchcontrol method according to an embodiment of this application;

FIG. 22(a) and FIG. 22(b) are a schematic diagram 17 of an applicationscenario of a touch control method according to an embodiment of thisapplication;

FIG. 23 is a schematic diagram 18 of an application scenario of a touchcontrol method according to an embodiment of this application;

FIG. 24 is a schematic structural diagram 2 of a terminal according toan embodiment of this application; and

FIG. 25 is a schematic structural diagram 3 of a terminal according toan embodiment of this application.

DESCRIPTION OF EMBODIMENTS

The following terms “first” and “second” are merely intended for apurpose of description, and shall not be understood as an indication orimplication of relative importance or implicit indication of the numberof indicated technical features.

Therefore, a feature limited by “first” or “second” may explicitly orimplicitly include one or more features. In the description of theembodiments of this application, unless otherwise stated, “a pluralityof” means two or more than two.

A touch control method provided in the embodiments of this applicationmay be applied to any terminal having a touchscreen, such as a mobilephone, a wearable device, an augmented reality (AR) device/virtualreality (VR) device, a tablet computer, a notebook computer, anultra-mobile personal computer (UMPC), a netbook, or a personal digitalassistant (PDA). Certainly, a specific form of the terminal is notlimited in the following embodiments.

As shown in FIG. 1, the terminal in the embodiments of this applicationmay be a mobile phone 100. The mobile phone 100 is used as an examplebelow to describe the embodiments in detail. It should be understoodthat the mobile phone 100 shown in the figure is merely an example ofthe terminal, and the mobile phone 100 may have more or fewer componentsthan those shown in the figure, or may combine two or more components,or may have different component configurations.

As shown in FIG. 1, the mobile phone 100 may specifically includecomponents such as a processor 101, a radio frequency (RF) circuit 102,a memory 103, a touchscreen 104, a Bluetooth apparatus 105, one or moresensors 106, a wireless fidelity Wi-Fi) apparatus 107, a positioningapparatus 108, an audio circuit 109, a peripheral interface 110, and apower supply system 111. These components may communicate with eachother by using one or more communications buses or signal lines (notshown in FIG. 1). A person skilled in the art may understand that ahardware structure shown in FIG. 1 does not constitute a limitation onthe mobile phone, and the mobile phone 100 may include more or fewercomponents than those shown in the figure, or may combine somecomponents, or may have different component arrangements.

The following describes in detail the components of the mobile phone 100with reference to FIG. 1.

The processor 101 is a control center of the mobile phone 100. Theprocessor 101 is connected to parts of the mobile phone 100 by usingvarious interfaces and lines, runs or executes an application programstored in the memory 103, and invokes data stored in the memory 103, toperform various functions of the mobile phone 100 and data processing.In some embodiments, the processor 101 may include one or moreprocessing units. For example, the processor 101 may be a Kirin 960 chipmanufactured by the Huawei. In some embodiments of this application, theprocessor 101 may further include a fingerprint verification chip,configured to verify a collected fingerprint.

The radio frequency circuit 102 may be configured to receive and send aradio signal in an information receiving and sending process or in acall process. Particularly, after receiving downlink data from a basestation, the radio frequency circuit 102 may send the downlink data tothe processor 101 for processing, and send related uplink data to thebase station. Generally, the radio frequency circuit includes but is notlimited to an antenna, at least one amplifier, a transceiver, a coupler,a low noise amplifier, a duplexer, and the like. In addition, the radiofrequency circuit 102 may further communicate with another devicethrough wireless communication. The wireless communication may use anycommunications standard or protocol, including but not limited to globalsystem for mobile communications, a general packet radio service, codedivision multiple access, wideband code division multiple access, longterm evolution, an email, an SMS message service, and the like.

The memory 103 is configured to store the application program and data.The processor 101 runs the application program and the data stored inthe memory 103, to perform various functions of the mobile phone 100 anddata processing. The memory 103 mainly includes a program storage areaand a data storage area. The program storage area may store an operatingsystem, and an application program required by at least one function(for example, a sound playing function or an image playing function).The data storage area may store data (for example, audio data or anaddress book) created when the mobile phone 100 is used. In addition,the memory 103 may include a high-speed random access memory (RAM), ormay include a nonvolatile memory such as a magnetic disk storage device,a flash memory device, or another volatile solid-state storage device.The memory 103 may store various operating systems such as an iOS®operating system developed by Apple and an Android® operating systemdeveloped by Google. The memory 103 may be independent and is connectedto the processor 101 by using the communications bus; or the memory 103may be integrated with the processor 101.

The touchscreen 104 may specifically include a touchpad 104-1 and adisplay 104-2.

The touchpad 104-1 may collect a touch operation performed by a user ofthe mobile phone 100 on or near the touchpad 104-1 (for example, anoperation performed by the user on the touchpad 104-1 or near thetouchpad 104-1 by using any proper object such as a finger or a stylus),and send collected touch information to another component (such as theprocessor 101). The touch operation performed by the user near thetouchpad 104-1 may be referred to as a floating touch. The floatingtouch may mean that the user does not need to directly touch thetouchpad for selecting, moving, or dragging an object (for example, anicon), and the user only needs to be near the terminal to execute anexpected function. In addition, the touchpad 104-1 may be implemented ina plurality of types such as a resistive type, a capacitive type, aninfrared type, a surface acoustic wave type.

The display (may also be referred to as a display screen) 104-2 may beconfigured to display information entered by the user or informationprovided for the user, and various menus of the mobile phone 100. Thedisplay 104-2 may be configured in a form of a liquid crystal display,an organic light emitting diode, or the like. The touchpad 104-1 maycover the display 104-2. After detecting the touch operation performedon or near the touchpad 104-1, the touchpad 104-1 transfers the touchoperation to the processor 101 to determine a type of the touchoperation. Then the processor 101 may provide a corresponding visualoutput on the display 104-2 based on the type of the touch operation.Although in FIG. 1, the touchpad 104-1 and the display screen 104-2 areused as two independent components to implement input and outputfunctions of the mobile phone 100. However, in some embodiments, thetouchpad 104-1 and the display screen 104-2 may be integrated toimplement the input and output functions of the mobile phone 100.

In this embodiment of this application, the user may set touch mappingrules for different touch areas on the touchscreen 104 in differentapplication scenarios. For example, as shown in FIG. 2 (a), when anapplication A is running, a touch sensitivity of a rectangular toucharea 21 a in a center of the touchscreen 104 may be set to twice that ofanother area. Alternatively, as shown in FIG. 2 (b), when an applicationB is running, a response event for a touch action (for example, a taptouch action or a touch and hold touch action) in a touch area 22 b maybe customized.

Therefore, in different application scenarios, a touch area customizedby the user may be obtained by dividing the touchscreen 104 into logicalareas. In addition, the user may set, in the customized touch area, atouch mapping rule that conforms to a current application scenario andan operation habit of the user, so that the user subsequently obtains acustomized touch feeling in the customized touch area. This implementsrefined and personalized control on the touchscreen 104, and providesmore rich touch experience for the terminal including the touchscreen104.

The touch sensitivity may be used to reflect a ratio of a movementdistance of a display object generated when the terminal responds to aspecific touch operation on the touchscreen 104 to an actual slidingdistance of a finger on the touchscreen 104 in the touch operation. Ahigher touch sensitivity indicates a larger ratio, and a lower touchsensitivity indicates a smaller ratio. For some refined operations suchas an image retouching operation and a text marking operation, arelatively low touch sensitivity may improve accuracy of theseoperations. However, for some operations with relatively strongreal-time performance such as attack and running operations in a game, arelatively high touch sensitivity may improve speeds of these operationsand user experience.

The response event for the touch action is a specific touch operationcorresponding to a touch event generated by the mobile phone 100 whenthe mobile phone 100 receives a touch action entered by the user at aspecific location on the touchscreen 104. For example, when the usertaps a point C on the touchscreen 104, the mobile phone 100 may generatetwo touch events: an action down event and an action up event at thepoint C. After the mobile phone 100 reports the two touch events to acorresponding application, the application may determine, by invoking alibrary function that is preset in the mobile phone 100, that the twotouch events correspond to a tap operation, and then respond to the tapoperation to implement an application function of the tap operation atthe point C.

Certainly, in addition to the touch sensitivity and the response eventfor the touch action, the touch mapping rule may further include otherparameters used to adjust a touch habit of the user, for example, touchprecision, touch pressure sensing, and a touch time. This is not limitedin this embodiment of this application.

It can be understood that the touchscreen 104 is formed by stacking aplurality of layers of materials. In this embodiment of thisapplication, only the touchpad (layer) and the display screen (layer)are displayed, and another layer is not recorded in this embodiment ofthis application. In addition, the touchpad 104-1 may be disposed on afront side of the mobile phone 100 in a full panel form, and the displayscreen 104-2 may also be disposed on the front side of the mobile phone100 in a full panel form. In this way, a bezel-less structure can beimplemented for the front side of the mobile phone.

The mobile phone 100 may further include the Bluetooth apparatus 105,configured to implement exchange data between the mobile phone 100 andanother terminal (for example, a mobile phone or a smartwatch) at ashort distance from the mobile phone 100. In this embodiment of thisapplication, the Bluetooth apparatus may be an integrated circuit, aBluetooth chip, or the like.

The mobile phone 100 may further include the at least one sensor 106,such as a fingerprint collection device 112, a light sensor, a motionsensor, and another sensor. Specifically, the fingerprint collectiondevice 112 may be configured on a back side of the mobile phone 100 (forexample, at a lower part of a rear-facing camera), or the fingerprintcollection device 112 may be configured on the front of the mobile phone100 (for example, at a lower part of the touchscreen 104). For anotherexample, the fingerprint collection device 112 may be disposed on thetouchscreen 104 to implement a fingerprint recognition function. Inother words, the fingerprint collection device 112 may be integratedwith the touchscreen 104 to implement the fingerprint recognitionfunction of the mobile phone 100. The light sensor may include anambient light sensor and a proximity sensor. The ambient light sensormay adjust luminance of the display of the touchscreen 104 based onluminance of ambient light, and the proximity sensor may power off thedisplay when the mobile phone 100 is moved to an ear. As a type ofmotion sensor, an accelerometer sensor may detect acceleration values invarious directions (usually on three axes). The accelerometer sensor maydetect a value and a direction of gravity when the accelerometer sensoris stationary, and may be applied to an application for recognizing amobile phone posture (for example, switching between a landscape screenand a vertical screen, a related game, and magnetometer posturecalibration), a function related to vibration recognition (such as apedometer and a knock), and the like. Other sensors such as a gyroscope,a barometer, a hygrometer, a thermometer, and an infrared sensor may befurther configured in the mobile phone 100. Details are not describedherein.

The Wi-Fi apparatus 107 is configured to provide the mobile phone 100with network access that complies with a Wi-Fi related standardprotocol. The mobile phone 100 may access a Wi-Fi access point by usingthe Wi-Fi apparatus 107, to help the user receive and send an email,browse a web page, access streaming media, and the like. The Wi-Fiapparatus 107 provides wireless broadband Internet access for the user.In some other embodiments, the Wi-Fi apparatus 107 may be used as aWi-Fi wireless access point, and may provide Wi-Fi network access foranother terminal.

The positioning apparatus 108 is configured to provide a geographicallocation for the mobile phone 100. It can be understood that thepositioning apparatus 108 may be specifically a receiver of apositioning system such as a global positioning system (GPS), a BeiDounavigation satellite system, or a Russian GLONASS. After receiving thegeographical location sent by the positioning system, the positioningapparatus 108 sends the information to the processor 101 for processing,or sends the information to the memory 103 for storage. In some otherembodiments, the positioning apparatus 108 may alternatively be areceiver of an assisted global positioning system (AGPS). The AGPSsystem serves as an assisted server to assist the positioning apparatus108 in completing ranging and positioning services. In this case, theassisted positioning server communicates with the terminal such as thepositioning apparatus 108 (namely, a GPS receiver) of the mobile phone100 through a wireless communications network, to provide positioningassistance. In some other embodiments, the positioning apparatus 108 mayalternatively be a positioning technology that is based on a Wi-Fiaccess point. Each Wi-Fi access point has a globally unique media accesscontrol (MAC) address, and the terminal can scan and collect a broadcastsignal of a nearby Wi-Fi access point when the terminal enables Wi-Fi.Therefore, a MAC address that is broadcast by the Wi-Fi access point canbe obtained. The terminal sends, to a location server through thewireless communications network, data (for example, the MAC address)that can identify the Wi-Fi access point. The location server obtains ageographical location of each Wi-Fi access point through retrieving,calculates a geographical location of the terminal and sends thegeographical location to the positioning apparatus 108 of the terminalwith reference to a strength of a Wi-Fi broadcast signal.

The audio circuit 109, a speaker 113, and a microphone 114 may providean audio interface between the user and the mobile phone 100. The audiocircuit 109 may convert received audio data into an electrical signaland transmit the electrical signal to the speaker 113, and the speaker113 converts the electrical signal into a sound signal for output. Inaddition, the microphone 114 converts a collected sound signal into anelectrical signal, and the audio circuit 109 receives the electricalsignal, converts the electrical signal into audio data, and outputs theaudio data to the RF circuit 102, to send the audio data to, forexample, another mobile phone, or outputs the audio data to the memory103 for further processing.

The peripheral interface 110 is configured to provide various interfacesfor an external input/output device (for example, a keyboard, a mouse,an external display, an external memory, or a subscriber identificationmodule card). For example, the terminal is connected to the mousethrough a universal serial bus (universal serial bus, USB) interface. Byusing a metal contact on a card slot of a subscriber identificationmodule (subscriber identification module, SIM) card provided by atelecommunications operator, the terminal is connected to the subscriberidentification module card. The peripheral interface 110 may beconfigured to couple the external input/output peripheral device to theprocessor 101 and the memory 103.

The mobile phone 100 may further include the power supply apparatus 111(for example, a battery and a power management chip) that supplies powerto the components. The battery may be logically connected to theprocessor 101 by using the power management chip, so that functions suchas charging, discharging, and power consumption management areimplemented by using the power supply apparatus 111.

Although not shown in FIG. 1, the mobile phone 100 may further include acamera (a front-facing camera and/or the rear-facing camera), aflashlight, a micro projection apparatus, a near field communication(NFC) apparatus, or the like. Details are not described herein.

Further, the mobile phone 100 may run an operating system such as anAndroid operating system or an iOS operating system. The Androidoperating system is used as an example. As shown in FIG. 3, the Androidoperating system may be divided into four layers: an application layer201 (namely, an APP layer), an application framework layer 202 (namely,a framework layer), a system runtime library layer 203 (namely, alibrary layer), and a Linux kernel layer 204 in descending order.

The Linux kernel layer 204 may be configured to control functions of themobile phone 100 such as security, memory management, program management(Process Management), network stack, and driver model. The Linux kernellayer 204 is also used as an abstraction layer between hardware (forexample, a CPU, a network interface card, and a memory) and a softwarestack, and may hide specific hardware details, to provide a unifiedservice for upper layers (the system runtime library layer 203, theapplication framework layer 202, and the application layer 201).

The system runtime library layer 203 includes some C/C++ libraries, suchas a media library, a system C library, and a display management library(surface manager). These libraries can be used by different componentsin the Android system, and the system runtime library layer 203 mayprovide a service for a developer by using the framework layer 202.

The framework layer 202 provides the developer with an API frameworkthat can be used for fully accessing an application program.Specifically, the framework layer 202 provides a large quantity of APIsfor developing an application program, and an APP that meets a relatedservice requirement may be constructed by invoking a corresponding API.

The application layer 201 mainly includes an APP compiled in a javalanguage. When operating an operation interface of the APP, a userinteracts with the system runtime library layer 203 or the Linux kernellayer 204 by invoking a related API at the framework layer 202, toimplement a function corresponding to the operation interface.

In this embodiment of this application, a process in which an APP (forexample, an application A) running at the application layer 201 obtainsa touch operation entered by the user on the touchscreen 104 is aprocess of distributing a message layer by layer in ascending order.

Specifically, as shown in FIG. 4, when a finger of the user touches thetouchscreen 104 at a hardware layer, the touchscreen 104 obtains relatedinformation (for example, coordinates of a touch point) of the touchoperation. Further, the touchscreen 104 may report, to the Linux kernellayer 204 in an interruption form by using a corresponding driver, anoriginal touch event generated by the touch action. The framework layer202 includes an event bus layer 202 a that communicates with a lowerlayer and an input read distribution layer 202 b that communicates withan upper layer. After obtaining the original touch event, the Linuxkernel layer 204 may perform an encapsulation operation such ascoordinate system conversion on the touch event, to generate an advancedtouch event (for example, an action down event, an action move event,and an action up event) that can be read by the upper layer, and sendthe advanced touch event to the event bus layer 202 a. Then, the eventbus layer 202 a distributes the advanced touch event to the input readdistribution layer 202 b.

Finally, the input read distribution layer 202 b reports the advancedtouch event to an application process of the application A that isrunning at the application layer 201. In this case, the applicationprocess of the application A may invoke a C/C++ library function at thesystem runtime library layer 203 to determine a specific operationcorresponding to the advanced touch event, for example, a tap operation.Further, a library function at the system runtime library layer 203 maycall back a callback function that is written by the application A forthe tap operation in advance, and the callback function specifies afunction executed by the application A to respond to the tap operationof the user. For example, the callback function may be an onclickfunction, so that the application A executes a callback functioncorresponding to the tap operation at a location of the touch point. Forexample, the onclick function written by the application A for the tapoperation at the touch point is used to implement a video playbackfunction.

Corresponding to obtaining of the touch operation, a process in whichthe application A at the application layer 201 implements a functionindicated by the callback function is a process in which delivering isperformed layer by layer in descending order, and finally the controlinstruction is executed by related hardware.

An example of implementing the foregoing video playback function isused. when the application process of the application A at theapplication layer 201 determines, based on a touch operation reported bythe bottom layer, that the video playback function needs to beimplemented, a video playback instruction may be generated and sent tothe input read distribution layer 202 b and the event bus layer 202 a atthe framework layer 202 layer by layer; then the event bus layer 202 asends the video playback instruction to the Linux kernel layer 204; andfinally the Linux kernel layer 204 implements a video playback output byinvoking hardware such as a processor, a memory, and the touchscreen 104by using a driver.

In this embodiment of this application, the user predefines, on thetouchscreen 104, a touch mapping rule of a specific touch area when theapplication A is running. Therefore, after the Linux kernel layer 204obtains the touch operation reported by the touchscreen 104, the Linuxkernel layer 204 (or the framework layer 202) of the terminal maydetermine whether a location of a touch point in the touch operationfalls within the touch area customized by the user. If the location ofthe touch point in the touch operation falls within the touch areacustomized by the user, related information carried in the touchoperation may be modified according to the touch mapping rule that isset by the user. For example, the user predefines that a tap operationin a touch area 1 is mapped to a double-tap operation. In this case,when the touch operation reported by the touchscreen 104 is determinedby the terminal as the tap operation falling within the touch area 1,the terminal may change a response event for the touch action from thetap operation to the double-tap operation. Further, a callback functioncorresponding to the double-tap operation is called back to the APPrunning at the application layer 201, to implement a touch controleffect of the double-tap operation. This implements refined andcustomized touch control on the touchscreen 104, and improves inputefficiency of the terminal.

The following describes in detail a touch control method provided in anembodiment of this application with reference to a specific embodiment.As shown in FIG. 5, the method includes the following steps.

S501. A terminal obtains a first input of a user when running a targetapplication, where the first input is used to trigger the terminal toenter a setting interface of a customized touch area.

The target application may be any application installed in the terminal,such as a video application, a game application, or a communicationapplication. This is not limited in this embodiment of this application.

A game application A is used as an example. In a process in which theterminal runs the application A, a control used to customize a toucharea may be displayed on a display interface of the application A. Asshown in FIG. 6, a control 600 may be displayed on a login interface ofthe application A, to prompt the user to customize touch mapping rulesfor different touch areas when the application A is running. Thisimproves input and response efficiency when the application A isrunning. Therefore, when it is detected that the user taps the control600, the first input of the user is obtained.

Alternatively, as shown in FIG. 7A, an option 700 “customize a touchmapping rule” may be set on a setting interface of the application A.After the user taps the option 700 “customize a touch mapping rule”, theuser may tap an option “modify a rule” to customize different touchareas and touch mapping rules for different touch areas. In this case,when it is detected that the user taps the option “modify a rule”, thefirst input of the user is obtained.

Certainly, the user may also provide, on a setting interface of anoperating system of the terminal, an entry for setting customized touchareas and touch mapping rules for different applications. As shown inFIG. 7B, the terminal provides an option 701 “customized touch” on thesetting interface. After enabling the option 701 “customized touch”, theuser may select to set customized touch areas and touch mapping rulesfor different applications (for example, the application A). Theapplication A is used as an example. After the user selects an effectiveapplication of the customized touch as the application A, as shown inFIG. 7B, an established touch area (for example, a touch area 1 and atouch area 2 in FIG. 7B) may be modified. After the user taps a button702 in the touch area 1, a size and a location of the touch area, and atouch mapping rule for the touch area 1 may be modified. Certainly, theuser may also tap a button 703 for adding a customized touch area, tocreate a new touch area and touch mapping rule. This is not limited inthis embodiment of this application.

Certainly, the user may also enter, to the terminal by using a voice orthe like, the first input used to enable a touch mapping rule in acustomized touchscreen. This is not limited in this embodiment of thisapplication.

S502. The terminal displays a translucent setting interface on a displayinterface of the target application.

In response to the first input of the user, in step S502, the terminalmay draw a translucent image layer on the display interface of thecurrent target application through superimposing, and display thetranslucent image layer on the touchscreen of the terminal as thesetting interface. In this case, as shown in FIG. 8, the terminal mayprompt the user to draw a customized target touch area on a settinginterface 800. The user may freely customize a target touch arearequired by the user, and set a touch mapping rule that is valid for thetarget touch area in the customized target touch area. This improvesinput and output performance when the target application runs.

S503. The terminal obtains a second input of the user on the settinginterface, where the second input includes the target touch areacustomized by the user on the touchscreen and a target touch mappingrule that is set for the target touch area.

In some embodiments of this application, still as shown in FIG. 8, theuser may draw a target touch area 801 of a specific size at any locationon the setting interface 800 by using an area template 802 (for example,a rectangular template, a triangle template, or a circular template)that is preset by the terminal. In this case, the terminal may record aspecific location and size of the target touch area 801 on thetouchscreen by using a plane geometric function (for example, arectangular area function or a circular area function) of the areatemplate. For example, as shown in FIG. 8, the target touch area 801 maybe represented as: Area 1=f (p, r), where p represents coordinates of acircle center, and r represents a circle radius.

In some other embodiments of this application, as shown in FIG. 9, theuser may also draw boundary points of the target touch area on thesetting interface 800 in a specific order (for example, a clockwise orcounterclockwise order). A line connecting these boundary points mayconstitute a target touch area 901. In this case, the terminal mayrecord a specific location and size of the target touch area 901 on thetouchscreen by using coordinates of the boundary points. For example,still as shown in FIG. 9, the target touch area 901 may be representedas Area 2 {A, B, C, D, and E}, where A, B, C, D, and E are coordinatesof five boundary points of the target touch area 901 in a clockwiseorder.

Further, after customizing the target touch area on the settinginterface 800, the user may continue to set the touch mapping rule forthe target touch area. For example, as shown in FIG. 10, the user sets acircular area in a lower left corner of a game application A as thetarget touch area 801. After recording the location and the size of thetarget touch area 801, the terminal may further prompt the user tomodify a touch mapping rule for the target touch area 80, for example, atouch sensitivity 1001 of the target touch area 801 and a response event1002 for a touch action.

The terminal may display the touch sensitivity 1001 in a form of aprogress bar on a current setting interface. The user may change aprogress of the progress bar by performing a drag operation, to modifythe touch sensitivity of the target touch area 801.

Still as shown in FIG. 10, an example in which the progress bar of thetouch sensitivity 1001 ranges from −100 to 100 is used. When the usersets the touch sensitivity 1001 to 0, it indicates that the touchsensitivity of the target touch area 801 does not need to be modified.In other words, the terminal uses a default touch sensitivity of theterminal when responding to the touch operation performed by the user inthe target touch area 801. In other words, if the terminal (or thetarget application) predefines that when the user slides 1 cm on thetouchscreen each time, a display object corresponding to the operationmay be controlled to move 1 meter. Therefore, when the user sets thetouch sensitivity 1001 to 0, and when the user slides 1 cm on thetouchscreen each time, the terminal still controls the correspondingdisplay object to move 1 meter when the terminal responds to theoperation.

When the touch sensitivity 1001 that is set by the user is greater than0, it indicates that the user expects that the touch sensitivity in thetarget touch area 801 is higher than a current default value. Forexample, a value of the touch sensitivity 1001 is 100. In this case, foreach touch action of moving 1 cm by the user in the target touch area801, the terminal may control, in response to the touch action, acorresponding display object to move 2 meters, in other words, respondto the touch action of the user in the target touch area 801 by using adistance twice the default touch sensitivity. For example, as shown inFIG. 11, when the user moves from a point A (0, 0) to a point B (1, 1)in the target touch area 801, based on the example that the touchsensitivity that is set by the user is 100, the terminal may multiplyboth horizontal coordinates and vertical coordinates of the point A andthe point B by 2, to obtain A (0, 0) and B′ (2, 2), and report themodified coordinate points to the target application, so that the targetapplication considers that the user moves from A (0, 0) to B′ (2, 2), torespond to the current touch action of the user with the doubledistance.

Correspondingly, when the touch sensitivity 1001 that is set by the useris less than 0, it indicates that the user expects the touch sensitivityin the target touch area 801 is lower than the current default value.For example, the value of the touch sensitivity 1001 is −100. In thiscase, for each touch action of moving 1 cm by the user in the targettouch area 801, the terminal may control, in response to the touchaction, a corresponding display object to move 0.5 meter, in otherwords, respond to the touch action of the user in the target touch area801 by using a distance ½ time the default touch sensitivity. Still asshown in FIG. 11, when the user moves from the point A (0, 0) to thepoint B (1, 1) in the target touch area 801, based on the example thatthe touch sensitivity that is set by the user is −100, the terminal maymultiply both horizontal coordinates and vertical coordinates of thepoint A and the point B by 0.5, to obtain A (0, 0) and B″ (0.5, 0.5),and report the modified coordinate points to the target application, sothat the target application considers that the user moves from A (0, 0)to B″ (0.5, 0.5), to respond to the current touch action of the user byusing ½ time the distance.

In this way, FIG. 10 is still used as an example. Because the targettouch area 801 in the lower left corner of the game application A isgenerally used to control a movement direction and a movement distanceof a game character, when the user increases the touch sensitivity inthe target touch area 801, the game character may be controlled, byusing a touch operation with a relatively short movement distance, tomove to a relatively distant location. This improves a movement speed ofthe game character, brings better game experience to the user, andimproves efficiency of input and output operations when the terminalruns the application A.

Optionally, to enable the user to quickly recognize the touch mappingrule of the touch sensitivity, when the user adjusts the value of thetouch sensitivity 1001 to be at different locations of the progress bar,the terminal may correspondingly prompt the user with a specific meaningof a current touch sensitivity. As shown in FIG. 12, when the user setsthe value of the touch sensitivity 1001 to 80, the terminal may prompt,by using a floating window 1101, the user that the movement speed of thegame character is increased by 1.8 times in this case.

In this case, the terminal may use a touch sensitivity 80 that is set bythe user as a coordinate mapping parameter in the touch mapping rule.Alternatively, a 1.8 times magnification rate corresponding to the touchsensitivity 80 may be used as the coordinate mapping parameter in thetouch mapping rule. Certainly, when the touch sensitivity that is set bythe user is less than 0, a minification rate corresponding to thecurrent touch sensitivity may be used as the coordinate mappingparameter in the touch mapping rule. Subsequently, when detecting thatthe user enters a first touch operation in the target touch area, theterminal may increase or decrease coordinate values of a coordinatepoint in the first touch operation based on the coordinate mappingparameter, to map the first touch operation to a second touch operation.

In other words, the terminal may provide, in a form of a touchsensitivity, a customized function for the target touch area for theuser, and the terminal may store, in a form of a coordinate mappingparameter, the touch sensitivity that is customized and set by the user,so as to subsequently implement the customized function for the touchsensitivity based on the coordinate mapping parameter.

It may be understood that the user may further customize a plurality oftarget touch areas in the setting interface displayed in step S502, andset a touch mapping rule for each target touch area.

The game application A is still used as an example. As shown in FIG. 13,the user customizes two target touch areas on the setting interface. Oneis a circular area (namely, a target touch area 1) at a lower leftcorner of the touchscreen, and the other is a rectangular area (namely,the target touch area 2) at a lower right corner of the touchscreen.

For the target touch area 1, the user sets a value of a touchsensitivity in a touch mapping rule of the target touch area 1 to 80, soas to improve a movement speed of a game character of the application A.For the target touch area 2, because the area is generally used toimplement various attack operations in a game in the application A,these operations are generally set when the application A is released orwhen the terminal is delivered from a factory. For example, you candouble-tap an attack button to launch an attack. However, it isdifficult for the user to perform a double-tap operation. The user mayexpect that a tap operation can also achieve an attack effect that thedouble-tap operation can achieve. However, some game applicationsdetermine an input value of a function by using a frequency of acontinuous tap operation, but the continuous tap operation is difficult.The user may expect to achieve an effect of the continuous tap operationby performing a touch and hold operation.

In this embodiment of this application, the user may further customize aresponse event of a touch action in the target touch area. Still asshown in FIG. 13, the user may select an option of “mapping a tapoperation to a double-tap operation” and an option of “mapping a touchand hold operation to a continuous tap operation” in the target toucharea 2. The terminal stores a response event of the touch actionselected by the user. Subsequently, when the terminal receives a tapoperation entered by the user in the target touch area 2, the terminalmay map the tap operation to a double-tap operation according to a touchmapping rule that is preset by the user for the target touch area 2, soas to implement a double-tap operation effect, and improve efficiency ofinput and output operations when the terminal runs the application A.

In addition, the terminal may further provide a more detailed settingoption of the touch mapping rule for the user. For example, when theuser sets that the tap operation is mapped to the double-tap operation,a time interval of the double-tap operation may be further set. When theuser sets that the touch and hold operation is mapped to the continuoustap operation, parameters such as a time threshold (in other words, howlong the touch lasts is mapped to the continuous tap operation) of thetouch and hold operation and a time interval between adjacent tapoperations mapped by the touch and hold operation may be set, so thattouch experience of the user on an operation interface of theapplication A more conforms to an operation habit of the user.

Further, as shown in FIG. 14, after receiving a touch mapping rule thatis set by the user for a target touch area (for example, the targettouch area 1), the terminal may further prompt the user to set thetarget touch area and an object on which the touch mapping rule of thetarget touch area takes effect. For example, it may be set that thetouch mapping rule of increasing the touch sensitivity to 80 in thetarget touch area 1 takes effect on all interfaces in a running processof the application A, or it may be set that the touch mapping rule takeseffect only on one or more interfaces in the running process of theapplication A, for example, a battle interface in a battle scenario.

Each application may distinguish different interfaces by using aninterface identifier (for example, a class name of an Activity in anAndroid system) during running. Therefore, the terminal may associatethe touch mapping rule with a class name that is of an Activity of oneor more interfaces and that is set by the user.

For example, the terminal may pre-store a correspondence betweendifferent types of display interfaces in the application A and classnames of Activities of the display interfaces. For example, a settinginterface in the application A includes an Activity 1 and an Activity 2,and a battle interface in the application A includes an Activity 3 andan Activity 4. When the user sets an effective object of the touchmapping rule to the battle interface, the terminal may associate thetouch mapping rule with the Activity 3 and the Activity 4. Subsequently,when the terminal identifies that a touch operation entered by the useroccurs on the associated interface, the terminal may respond to thetouch action of the user in the target touch area 1 by using the touchmapping rule. Alternatively, the user may manually enter each displayinterface to set a touch mapping rule that takes effect only on acurrent interface. This is not limited in this embodiment of thisapplication.

Certainly, identifiers such as a package name or a process ID used whendifferent applications are running are usually different. Therefore, theuser may also set the touch mapping rule to be effective for another oneor more applications. In this case, the terminal may associate the touchmapping rule with the identifier that is of the one or more applicationsand that is set by the user, in this way, when running the one or moreapplications subsequently, the terminal may also respond to the touchaction of the user in the target touch area 1 by using the touch mappingrule.

It should be noted that when the user customizes the plurality of targettouch areas in the setting interface, the plurality of target touchareas may overlap. As shown in FIG. 15, the user first customizes andsets a target touch area 3 and a touch mapping rule A of the targettouch area 3 in the setting interface, and then customizes and sets atarget touch area 4 in the setting interface. There is an overlappingarea between the target touch area 4 and the target touch area 3.

In this case, if a touch mapping rule B that is set by the user for thetarget touch area 4 conflicts with the touch mapping rule A, forexample, the user sets a value of touch sensitivity in the target toucharea 3 to 80, and subsequently sets a value of a touch sensitivity inthe target touch area 4 to 30, the touch mapping rule B conflicts withthe touch mapping rule A. In this case, the terminal may display anerror prompt to the user, or still as shown in FIG. 15, the terminal mayreconfirm with the user whether to change the touch sensitivitypreviously set for the target touch area 3, and if the user confirms tochange the touch sensitivity of the target touch area 3, in this case,the terminal may set values of touch sensitivities of both the targettouch area 3 and the target touch area 4 to 30.

Certainly, if the touch mapping rule A of the target touch area 3 doesnot conflict with the touch mapping rule B of the target touch area 4,the terminal may continue to perform the following step S504, in otherwords, store each target touch area customized by the user and itstarget touch mapping rule in a certain data structure.

S504. The terminal stores a correspondence among the target touch area,the target touch mapping rule of the target touch area, and the targetapplication.

Specifically, after the terminal obtains the target touch areacustomized by the user on the touchscreen and the target touch mappingrule that is set for the target touch area, the terminal may store thecorrespondence among the target touch area, the target touch mappingrule of the target touch area, and the application (or an interface) onwhich the target touch mapping rule takes effect in a memory by using apreset data structure, so that when a touch operation entered by theuser is subsequently received, a corresponding target touch mapping rulecan be found to responded to the touch operation.

As shown in Table 1, the terminal may set a profile (configuration) filefor each target touch area by using one target touch area asgranularity. The profile file is associated with one or morecorresponding applications (or interfaces). Each profile file records alocation of a corresponding target touch area on the touchscreen and atarget touch mapping rule of the target touch area.

A profile 1 is used as an example. The user enters a customized targettouch area Area 1 and a touch sensitivity of the Area 1 (namely, thesecond input in step S503) to the terminal on the setting interface ofthe game application A. In response to the second input, the terminalgenerates the profile 1. The profile 1 includes coordinate informationof the Area 1 and a target touch mapping rule that is set by the userfor the Area 1. In the target touch mapping rule, a value of the touchsensitivity is modified to 80, and the response event of the touchaction still uses a default response mechanism of the terminal and isnot modified. In addition, the terminal establishes a correspondencebetween the profile 1 and the application A. Subsequently, when runningthe application A, the terminal may obtain, by querying a mappingrelationship shown in Table 1, all profile files corresponding to theapplication A.

TABLE 1 Identifier of an application Target Target touch mapping rule(or an File touch Touch Response event of a interface) number areasensitivity touch action Application Profile 1 Area 1 80 Default AProfile 2 Area 2  0 Tap operation → double-tap operation. Interface BProfile 3 Area 3 30 Touch and hold operation → continuous tap operation

In addition, in some embodiments of this application, as shown in FIG.16, the terminal may further share a generated profile file to anotherdevice. In this way, a same customized target area and a same touchcontrol effect may be copied on the other device. Certainly, if adisplay parameter such as screen resolution of a receiving device thatreceives the profile file is different from a display parameter of theterminal that sends the profile file, the receiving device may alsoperform corresponding conversion on the received profile file for use.This is not limited in this embodiment of this application.

Alternatively, in some other embodiments of this application, still asshown in FIG. 16, the terminal may upload the generated profile file toa cloud server. When running a related application (for example, thegame application A), another terminal may also download, from the cloud,the profile 1 corresponding to the application A, and copy a samecustomized target area and a same touch control effect on the otherdevice.

Certainly, after receiving the profile file reported by each terminal,the server may also optimize, by using an algorithm such as big datastatistics, a profile file corresponding to an application (or aninterface). For example, when 90% of terminals run the application A,the value of the touch sensitivity of the Area 1 is adjusted to begreater than 80, in this case, the server may optimize a profile filethat includes the Area 1 and that correspond to the application A,adjust a value of a touch sensitivity in a target touch mapping rule ofthe profile file that includes the Area 1 and that corresponds to theapplication A to 80, and further deliver an optimized profile file to aterminal whose touch sensitivity is lower than 80, so that the terminalimplements a touch control effect with a higher touch sensitivity whenrunning the application A. Certainly, after receiving the optimizedprofile file sent by the server, the terminal may further prompt theuser whether to use the touch mapping rule that is set in the optimizedprofile file, so as to improve user experience.

By performing steps S501 to S504, in different application scenarios,the user may divide the touchscreen of the terminal into logical areas,to obtain a touch area customized by a user. In addition, the user mayset, in the touch area customized by the user, a touch mapping rule thatconforms to a current application scenario and an operation habit of theuser, so that the user subsequently obtains a customized touch feelingin the touch area customized by the user. This implements refined andpersonalized control on the touchscreen of the terminal, so as toimprove input and output efficiency of the terminal in differentapplication scenarios.

In some other embodiments of this application, a touch control method isprovided. As shown in FIG. 17, the method includes the following steps.

S601. A terminal obtains a first touch operation entered by a user on atouchscreen.

Optionally, the terminal may obtain coordinate information of a touchpoint through which the first touch operation passes. The touch pointdescribed herein may be a touch point detected by the touchscreen whenthe user enters the first touch operation, or may be a pixel thatcorresponds to the touch point detected by the touchscreen and that ison a display screen.

Similar to step S501, the target application may be any applicationinstalled in the terminal, such as a video application, a gameapplication, or a communication application. This is not limited in thisembodiment of this application.

The game application A is still used as an example. When running theapplication A, the terminal may display a display interface of theapplication A on the touchscreen in real time, and the user may enter acorresponding input operation on the touchscreen to implement a relatedfunction provided by the application A.

For example, as shown in FIG. 18, after starting the application A, theterminal enters a battle interface 1701 in a game, and the user may tapa simulated control handle 1702 in a lower left corner area of thebattle interface 1701 to control a game character to move up, down,left, and right. Therefore, when the user moves the simulated controlhandle 1702 to slide rightward (namely, the first touch operation), thetouchscreen of the terminal may report detected touch information (forexample, including a touch event and coordinate information of a touchpoint) to a kernel layer, a framework layer, and an application layer ofthe terminal in sequence.

Certainly, the touchscreen may further add touch information such astouch time of the detected current touch operation to the first touchoperation. This is not limited in this embodiment of this application.

In addition, the coordinate information in the touch operation may beabsolute coordinate information of the touch point on the touchscreen,or may be relative coordinate information obtained after the terminalconverts the absolute coordinate information.

The absolute coordinate information is coordinates of the touch point ina coordinate system defined by a manufacturer of the touchscreen. Forexample, in a process of producing a touchscreen, a coordinate system ofthe touchscreen may be set in an IC chip of the touchscreen. As shown inFIG. 19 (a), a first coordinate system is set by using a lower leftcorner of the touchscreen as an origin O (0, 0). In this case, when thetouchscreen detects that the user enters a touch operation at a point Pof the touchscreen, it may be determined, in the first coordinatesystem, that coordinates of the point P are P (5, 0). In this case, P(5, 0) is the absolute coordinate information.

However, in some cases, a coordinate system set on the touchscreen maybe different from a coordinate system defined by an operating system ofthe terminal. For example, as shown in FIG. 19 (b), the operating systemof the terminal sets a second coordinate system by using an upper leftcorner of the touchscreen as an origin O′ (0, 0). In this case, thetouch operation entered by the user at the point P on the touchscreen ismapped, in the second coordinate system, to a touch operation at a pointP′ (5, 15) on the touchscreen. In this case, P′ (5, 15) is the relativecoordinate information.

Optionally, the foregoing process of mapping the absolute coordinateinformation to the relative coordinate information may be completed bythe kernel layer in the terminal, or may be completed by the frameworklayer in the terminal. This is not limited in this embodiment of thisapplication.

S602. The terminal determines whether the first touch operation isperformed on a first preset area in a target interface.

The target interface is any interface presented by the targetapplication running in the foreground in step S601. For example, thefirst preset area is the target touch area customized by the user in theforegoing embodiment, and the target interface may cover a part or allof the target touch area.

In addition, that the first touch operation is performed on the firstpreset area may mean that the touchscreen detects, in a floating ortouch manner, that an operation object or an operation track of thefirst touch operation of the user falls within the first preset area.For example, when it is detected that coordinates of a touch point ofthe first touch operation fall within the first preset area, it may bedetermined that the first touch operation is performed on the firstpreset area.

Specifically, in step S602, after obtaining the first touch operation inthe target interface, to determine whether to respond to the first touchoperation by using the touch mapping rule customized by the user, theterminal may obtain an identifier of the target application that isrunning in the foreground at this time, and further search, based on theidentifier of the target application, the correspondence shown in Table1 for all profile files corresponding to the target application. Becauseeach of these profile files records a specific location of the targettouch area customized by the user, the terminal may determine, based oncoordinate information of the touch point in the first touch operation,a profile file in which the first touch operation specifically fallswithin the target touch area.

For example, if the terminal obtains that an identifier of a currentlyrunning application is a package name of the application A, it may bedetermined, through Table 1, that two profile files (namely, the profile1 and the profile 2 in Table 1) are customized by the user when theapplication A is running. Further, the terminal may separately comparecoordinate information P (x, y) of the touch point in the first touchoperation with the Area 1 in the profile 1 and the Area 2 in the profile2, to determine that the P point falls within the target touch area Area1 in the lower left corner of the touchscreen.

It should be noted that, when the terminal determines whether thecoordinate information falls within the target touch area, a coordinatesystem used by the coordinate information of the touch point should bethe same as a coordinate system used by the target touch area recordedin Table 1. For example, the terminal records the location of the Area 1based on the second coordinate system defined by the operating system,and the coordinate information P (x, y) of the touch point in the firsttouch operation reported by the touchscreen to the terminal is recordedbased on the first coordinate system. In this case, when the touchscreenreports the coordinate information P (x, y) to the kernel layer of theterminal, the kernel layer may map the coordinate information P (x, y)to coordinates P′ (x′, y′) in the second coordinate system, and furtherdetermine whether the coordinates P′ (x′, y′) falls within the targettouch area Area 1.

S603. If the first touch operation falls within the first preset area,the terminal maps the first touch operation to a second touch operation.

S604. The target application responds to the second touch operation, toimplement a customized touch function when the target application isrunning.

Still using an example in which the coordinate information P (x, y) ofthe touch point in the first touch operation falls within the targettouch area Area 1, in this case, with reference to the architecturaldiagram of the Android system shown in FIG. 3 and FIG. 4, as shown inFIG. 20, the touchscreen encapsulates the detected first touch operationas an original touch event by using a driver, and reports the originaltouch event to a kernel layer 204 of the terminal. Further, the kernellayer 204 maps the coordinate information P (x, y) carried in theoriginal touch event to coordinates P′ (x′, y′) in the second coordinatesystem, and encapsulates the original touch event as an advanced touchevent that can be read by an upper layer, and reports the advanced touchevent to a framework layer 202. The framework layer 202 may determine,by querying a correspondence between a profile file and an applicationshown in Table 1, that coordinates P′ (x′, y′) carried in the advancedtouch event falls within the target touch area Area 1 customized by theuser in the profile 1.

In this case, the terminal may search for a target touch mapping rulerecorded in the profile 1. A coordinate mapping parameter used toreflect a touch sensitivity is set in the target touch mapping rule. Forexample, the coordinate mapping parameter is 1.8, in other words, theapplication A responds, at a distance ratio of 1.8 times, to the firsttouch action entered by the user in the target touch area Area 1. Then,the framework layer 202 may multiply both a horizontal coordinate and avertical coordinate in the coordinates P′ (x′, y′) by 1.8 times, toobtain modified coordinates Q (1.8x′, 1.8y′), and use the modifiedcoordinates Q (1.8x′, 1.8y′) as coordinate information of a touch pointin the second touch operation. The framework layer 202 adds the modifiedcoordinates Q (1.8 x′, 1.8y′) to the advanced touch event, and reportsthe advanced touch event to the application A that is running at theapplication layer, so that the application A may respond to the secondtouch operation based on the modified coordinates Q (1.8x′, 1.8y′). Inother words, the user enters the first touch operation at the point P(x, y) to the touchscreen, and an application in the terminal finallyresponds to the user with the second touch operation at the point Q(1.8x′, 1.8y′).

For example, as shown in FIG. 21, the terminal detects the first touchoperation entered by the user at the point P (1, 0). Because the point Pfalls within the target touch area Area 1 customized by the user in theprofile 1, the terminal modifies coordinates P (1, 0) to coordinates Q(1.8×1, 1.8×0)=Q (1.8, 0) based on a value 80 of a touch sensitivity inthe profile 1. In this case, after the application A obtains the secondtouch operation whose coordinate values are Q (1.8, 0), if coordinatesof a touch point in a touch operation received by the application A lasttime are O (0, 0), the application A considers that a finger of the usercontrols the simulated control handle 1702 to move rightward by 1.8 cmfrom O (0, 0) to Q (1.8, 0), and actually the user controls thesimulated control handle 1702 to move rightward by 1 cm from the point O(0, 0) to the point P (1, 0). This implements an effect of controllingthe simulated control handle 1702 to move 1.8 cm, and improves amovement speed of a game character.

In addition, if a control area of the simulated control handle 1702 isfixed, for example, the user is only allowed to control the simulatedcontrol handle 1702 in a circular area shown in an Area 1 in FIG. 21. Inthis case, if the terminal modifies the coordinates of the touch pointin the first touch operation based on the value of the touchsensitivity, and the modified coordinates (for example, the Q point)exceed a control boundary of the control area Area 1 of the simulatedcontrol handle 1702, as shown in FIG. 21, the terminal may report, tothe application A, a Z point that is on the control boundary and that isclosest to the point Q as mapped coordinate information of the touchpoint in the second touch operation, so as to avoid a problem that theapplication cannot correctly respond to the first touch operationbecause the modified coordinates exceed the control area correspondingto the first touch operation.

It should be noted that the foregoing embodiment is described by usingan implementation of a fixed touch sensitivity as an example. In otherwords, as shown in FIG. 22(a), after the user sets the touch sensitivityof the target touch area Area 1 to 80, the terminal always responds tothe touch operation of the user in the target touch area Area 1 in aratio of 1.8.

It may be understood that the terminal may also modify the touchoperation in a non-linear manner, and finally reach a touch sensitivitythat is set by the user. For example, as shown in FIG. 22(b), after theuser sets the touch sensitivity of the target touch area Area 1 to 80,the terminal may change the touch sensitivity based on a distance ofsliding by the user in the Area 1, and gradually increase the touchsensitivity of the terminal when the sliding distance is larger, untilthe touch sensitivity is increased to 1.8 times of the default touchsensitivity.

In addition, as shown in FIG. 23, after the framework layer 202 reportsthe advanced touch event to the application A that is running at theapplication layer, the application A may invoke a related libraryfunction at a system runtime library layer 203, and the library functionhelps the application A determine, based on a parameter transferred inthe advanced touch event, a specific touch operation performed by theuser at the point P, for example, a tap operation. After determiningthat the current touch operation is the tap operation, if a profile filecorresponding to the touch point P records that a response event of thetap operation is a double-tap operation, the terminal does not callbacka callback function written for the tap operation in the application A,but call back a callback function written for the double-tap operationin the application A, in other words, (the tap operation) the firsttouch operation is mapped to the second touch operation (the double-tapoperation), so that the application A responds to the double-tapoperation and implements an effect of the double-tap operation at thetouch point P.

Certainly, if the framework layer 202 obtains an advanced touch event 1generated when the user performs the tap operation at the point P, andcan determine, based on the advanced touch event 1, that the userperforms the tap operation at the point P, at this time, the frameworklayer 202 may modify, based on the profile file corresponding to thepoint, the advanced touch event 1 generated by the tap operation to anadvanced touch event 2 that should be generated when the user performsthe double-tap operation at the point P, and report the advanced touchevent 2 to the application A that is running in the application layer.In this way, when the application A invokes a related library functionat the system runtime library layer 203, it may be determined that aspecific touch operation performed by the user at the point P is thedouble-tap operation. In this case, the terminal may call back thecallback function written for the double-tap operation in theapplication A, so that the application A can also respond to thedouble-tap operation and implement the effect of the double-tapoperation at the point P.

Further, in a running process of an application, the user usually hasdifferent requirements on a touch sensitivity of the application onlywhen the user performs a touch operation of a sliding type. Therefore,when coordinate information in the touch operation falls within thetarget touch area, the terminal may determine, by using a libraryfunction, that the current touch operation is a sliding operation, andthen, the coordinate information in the touch operation is modifiedbased on the touch sensitivity customized by the user in the profilefile.

Certainly, if the coordinate information in the touch operation does notfall within a target touch area preset for the target application, or atouch mapping rule that is set in a profile file corresponding to thecoordinate information is a default touch mapping rule of the terminal,after obtaining the touch operation, the terminal does not need tomodify the touch operation, and the target application responds to thetouch operation based on related touch information carried in the actualtouch operation. This is not limited in this embodiment of thisapplication.

It may be understood that, to implement the foregoing functions, theterminal and the like include corresponding hardware structures and/orsoftware modules for performing the functions. A person skilled in theart should easily be aware that, in combination with the examplesdescribed in the embodiments disclosed in this specification, units,algorithms, and steps may be implemented by hardware or a combination ofhardware and computer software in this application. Whether a functionis performed by hardware or hardware driven by computer software dependson particular applications and design constraints of the technicalsolutions. A person skilled in the art may use different methods toimplement the described functions for each particular application, butit should not be considered that the implementation goes beyond thescope of the embodiments of this application.

In the embodiments of this application, the terminal may be divided intofunctional modules based on the foregoing method examples. For example,each functional module may be obtained through division based on eachcorresponding function, or two or more functions may be integrated intoone processing module. The integrated module may be implemented in aform of hardware, or may be implemented in a form of a softwarefunctional module. It should be noted that, in this embodiment of thisapplication, module division is an example, and is merely logicalfunction division. In actual implementation, another division manner maybe used.

When each function module is obtained through division based on eachcorresponding function, FIG. 24 is a possible schematic structuraldiagram of the terminal in the foregoing embodiments. The terminalincludes an obtaining unit 2401, a storage unit 2402, a display unit2403, and a mapping unit 2404.

The obtaining unit 2401 is configured to support the terminal inperforming processes S501 and S503 in FIG. 5 and process S601 in FIG.17. The storage unit 2402 is configured to support the terminal inperforming the process S504 in FIG. 5. The display unit 2403 isconfigured to support the terminal in performing the process S502 inFIG. 5. The mapping unit 2404 is configured to support the terminal inperforming the processes S602 to S604 in FIG. 17. All related content ofthe steps in the foregoing method embodiments may be cited in functiondescriptions of a corresponding functional module. Details are notdescribed herein again.

When an integrated unit is used, the mapping unit 2404 may be used as aprocessing module, the storage unit 2402 may be used as a storagemodule, the obtaining unit 2401 may be used as an input module, and thedisplay unit 1106 may be used as a display module.

In this case, FIG. 25 is a possible schematic structural diagram of aterminal in the foregoing embodiments. A processing module 2502 isconfigured to control and manage an action of the terminal. An inputmodule 2503 is configured to support interaction between the terminaland a user. A storage module 2501 is configured to store program codeand data of the terminal. The display module 2504 is configured todisplay the information entered by the user or information provided forthe user, and various menus of the terminal.

In this embodiment of this application, the terminal may obtain, byusing the input module 2503, a first touch operation entered by the useron a touchscreen. When the first touch operation is performed on a firstpreset area on a target interface (namely, an interface on which atarget application runs in the foreground), the processing module 2502may map the first touch operation to a second touch operation, so thatthe target application responds to the second touch operation, toimplement refined and personalized control on the touchscreen.

All related content of the steps related to the application switchingmethod may be cited in related descriptions in steps S501 to S504 orS601 to S604 in the foregoing embodiment. Details are not describedherein again.

The processing module 2502 may be a processor or a controller, such as acentral processing unit (CPU), a GPU, a general-purpose processor, adigital signal processor (DSP), an application-specific integratedcircuit (ASIC), a field programmable gate array (FPGA), or anotherprogrammable logic device, a transistor logic device, a hardwarecomponent, or a combination thereof. The processor may implement orexecute various example logical blocks, modules, and circuits describedwith reference to content disclosed in this application. The processormay be a combination of processors implementing a computing function,for example, a combination of one or more microprocessors, or acombination of the DSP and a microprocessor.

The input module 2503 may be an input/output device or a communicationsinterface such as a touchscreen or a microphone.

The storage module 2501 may be a memory. The memory may include ahigh-speed random access memory (RAM), or may include a nonvolatilememory, such as a disk storage device, a flash storage device, oranother volatile solid-state storage device.

The display module 2504 may be a display, and the display may bespecifically configured in a form of a liquid crystal display, anorganic light-emitting diode, or the like. In addition, a touchpad maybe further integrated into the display, and is configured to: collect atouch event on or near the touchpad, and send collected touchinformation to another component (such as the processor).

When the processing module 2502 is a processor, the input module 2503 isa touchscreen, the storage module 2501 is a memory, and the displaymodule 2504 is a display, the terminal provided in this embodiment ofthis application may be the mobile phone 100 shown in FIG. 1.

All or some of the foregoing embodiments may be implemented by usingsoftware, hardware, firmware, or any combination thereof. When asoftware program is used to implement the embodiments, the embodimentsmay be implemented completely or partially in a form of a computerprogram product. The computer program product includes one or morecomputer instructions. When the computer program instructions are loadedand executed on the computer, the procedure or functions according tothe embodiments of this application are all or partially generated. Thecomputer may be a general-purpose computer, a dedicated computer, acomputer network, or other programmable apparatuses. The computerinstructions may be stored in a computer-readable storage medium or maybe transmitted from a computer-readable storage medium to anothercomputer-readable storage medium. For example, the computer instructionsmay be transmitted from a website, computer, server, or data center toanother website, computer, server, or data center in a wired (forexample, a coaxial cable, an optical fiber, or a digital subscriber line(DSL)) or wireless (for example, infrared, radio, or microwave) manner.The computer-readable storage medium may be any usable medium accessibleby a computer, or a data storage device, such as a server or a datacenter, integrating one or more usable media. The usable medium may be amagnetic medium (for example, a floppy disk, a hard disk, or a magnetictape), an optical medium (for example, a DVD), a semiconductor medium(for example, a solid-state drive Solid State Disk (SSD).

The foregoing descriptions are merely specific implementations of thisapplication, but are not intended to limit the protection scope of thisapplication. Any variation or replacement within the technical scopedisclosed in this application shall fall within the protection scope ofthis application. Therefore, the protection scope of this applicationshall be subject to the protection scope of the claims.

What is claimed is:
 1. A touch control method, comprising: obtaining, bya terminal, a first touch operation entered by a user on a touchscreen;and mapping, by the terminal, the first touch operation to a secondtouch operation when the first touch operation is performed on a firstpreset area in a target interface, so that a target application respondsto the second touch operation, wherein the target interface is anyinterface that is presented by the target application and that coversthe first preset area, and the target application is running in theforeground; and wherein the mapping, by the terminal, the first touchoperation to a second touch operation when the first touch operation isperformed on a first preset area in a target interface comprises: whenthe terminal detects the first touch operation in the target interface,searching for, by the terminal, at least one preset area associated withthe target application, wherein the at least one preset area comprisesthe first preset area; when a touch point of the first touch operationfalls within the first preset area, obtaining, by the terminal, a touchmapping rule that is preset for the first preset area; and mapping, bythe terminal, the first touch operation to the second touch operationaccording to the touch mapping rule.
 2. The method according to claim 1,A touch control method, comprising: obtaining, by a terminal, a firsttouch operation entered by a user on a touchscreen; and mapping, by theterminal, the first touch operation to a second touch operation when thefirst touch operation is performed on a first preset area in a targetinterface, so that a target application responds to the second touchoperation, wherein the target interface is any interface that ispresented by the target application and that covers the first presetarea, and the target application is running in the foreground; andwherein the mapping, by the terminal, the first touch operation to asecond touch operation comprises: modifying, by the terminal, coordinatevalues of the touch point in the first touch operation, and usingmodified coordinate values as coordinate values of a touch point in thesecond touch operation.
 3. The method according to claim 1, wherein thetouch mapping rule comprises a coordinate mapping parameter; and themapping, by the terminal, the first touch operation to the second touchoperation according to the touch mapping rule comprises: increasing ordecreasing, by the terminal, coordinate values of the touch point in thefirst touch operation based on the coordinate mapping parameter, toobtain coordinate values of a touch point in the second touch operation.4. The method according to claim 3, wherein the increasing ordecreasing, by the terminal, coordinate values of the touch point in thefirst touch operation based on the coordinate mapping parametercomprises: multiplying, by the terminal, the coordinate values of thetouch point in the first touch operation by the coordinate mappingparameter, wherein the coordinate mapping parameter is greater than 1 orless than
 1. 5. The method according to claim 2, wherein after themodifying, by the terminal, coordinate values of the touch point in thefirst touch operation, the method further comprises: if the touch pointwith the modified coordinate values falls beyond a preset controlboundary of the first touch operation, using, by the terminal,coordinate values that are on the control boundary and that are mostapproximate to the modified coordinate values as the coordinate valuesof the touch point in the second touch operation.
 6. The methodaccording to claim 1, wherein the mapping, by the terminal, the firsttouch operation to the second touch operation according to the touchmapping rule comprises: mapping, by the terminal according to the touchmapping rule, a first touch event generated when the user performs thefirst touch operation to a second touch event generated when the userperforms the second touch operation, and reporting the second touchevent to the target application.
 7. The method according to claim 1,wherein the mapping, by the terminal, the first touch operation to asecond touch operation, so that the target application responds to thesecond touch operation comprises: reporting, by the terminal to thetarget application, a touch event generated when the user performs thefirst touch operation, so that the target application instructs theterminal to determine the first touch operation based on the touchevent; and mapping, by the terminal, the determined first touchoperation to the second touch operation according to the touch mappingrule, and instructing the target application to respond to the secondtouch operation.
 8. The method according to claim 6, wherein the touchmapping rule maps a tap operation to a double-tap operation, or maps atouch and hold operation to a continuous tap operation.
 9. A terminal,comprising a processor, a memory, and an input device that are connectedvia a bus, wherein the input device is configured to obtain a firsttouch operation entered by a user on a touchscreen; and the processor isconfigured to: determine that the first touch operation is performed ona first preset area in a target interface, and map the first touchoperation to a second touch operation, so that a target applicationresponds to the second touch operation; search for at least one presetarea associated with the target application, wherein the at least onepreset area comprises the first preset area; and when a touch point ofthe first touch operation falls within the first preset area, obtain atouch mapping rule that is preset for the first preset area, and map thefirst touch operation to the second touch operation according to thetouch mapping rule; wherein the target interface is any interface thatis presented by the target application and that covers the first presetarea, and the target application is running in the foreground.
 10. Aterminal, comprising a processor, a memory, and an input device that areconnected via a bus, wherein the input device is configured to obtain afirst touch operation entered by a user on a touchscreen; and theprocessor is configured to: determine that the first touch operation isperformed on a first preset area in a target interface, and map thefirst touch operation to a second touch operation, so that a targetapplication responds to the second touch operation; wherein that theprocessor maps the first touch operation to a second touch operationcomprises: the processor modifies coordinate values of the touch pointin the first touch operation, and uses modified coordinate values ascoordinate values of a touch point in the second touch operation. 11.The terminal according to claim 9, wherein the touch mapping rulecomprises a coordinate mapping parameter, and that the processor mapsthe first touch operation to the second touch operation according to thetouch mapping rule comprises: the processor increases or decreasescoordinate values of the touch point in the first touch operation basedon the coordinate mapping parameter, to obtain coordinate values of atouch point in the second touch operation.
 12. The terminal according toclaim 11, wherein that the processor increases or decreases coordinatevalues of the touch point in the first touch operation based on thecoordinate mapping parameter comprises: the processor multiplies thecoordinate values of the touch point in the first touch operation by thecoordinate mapping parameter, wherein the coordinate mapping parameteris greater than 1 or less than
 1. 13. The terminal according to claim10, wherein the processor is further configured to determine that thetouch point with the modified coordinate values falls beyond a presetcontrol boundary of the first touch operation, and use coordinate valuesthat are on the control boundary and that are most approximate to themodified coordinate values as the coordinate values of the touch pointin the second touch operation.
 14. The terminal according to claim 9,wherein that the processor maps the first touch operation to the secondtouch operation according to the touch mapping rule comprises: theprocessor maps, according to the touch mapping rule, a first touch eventgenerated when the user performs the first touch operation to a secondtouch event generated when the user performs the second touch operation,and reports the second touch event to the target application.
 15. Theterminal according to claim 9, wherein that the processor maps the firsttouch operation to a second touch operation, so that the targetapplication responds to the second touch operation comprises: theprocessor reports, to the target application, a touch event generatedwhen the user performs the first touch operation, so that the targetapplication instructs the terminal to determine the first touchoperation based on the touch event; and the processor maps thedetermined first touch operation to the second touch operation accordingto the touch mapping rule, and instructs the target application torespond to the second touch operation.
 16. A non-transitorycomputer-readable storage medium, wherein the computer-readable storagemedium stores an instruction, and when the instruction is run on aterminal, the terminal is enabled to perform: obtaining, by a terminal,a first touch operation entered by a user on a touchscreen; and mapping,by the terminal, the first touch operation to a second touch operationwhen the first touch operation is performed on a first preset area in atarget interface, so that a target application responds to the secondtouch operation; wherein the target interface is any interface that ispresented by the target application and that covers the first presetarea, and the target application is running in the foreground; andwherein the mapping, by the terminal, the first touch operation to asecond touch operation comprises modifying, by the terminal, coordinatevalues of the touch point in the first touch operation, and usingmodified coordinate values as coordinate values of a touch point in thesecond touch operation.